Optimal. Leaf size=57 \[ \frac {a \sqrt {d x-c} \sqrt {c+d x}}{c^2 x}+\frac {2 b \tanh ^{-1}\left (\frac {\sqrt {d x-c}}{\sqrt {c+d x}}\right )}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {454, 63, 217, 206} \[ \frac {a \sqrt {d x-c} \sqrt {c+d x}}{c^2 x}+\frac {2 b \tanh ^{-1}\left (\frac {\sqrt {d x-c}}{\sqrt {c+d x}}\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 63
Rule 206
Rule 217
Rule 454
Rubi steps
\begin {align*} \int \frac {a+b x^2}{x^2 \sqrt {-c+d x} \sqrt {c+d x}} \, dx &=\frac {a \sqrt {-c+d x} \sqrt {c+d x}}{c^2 x}+b \int \frac {1}{\sqrt {-c+d x} \sqrt {c+d x}} \, dx\\ &=\frac {a \sqrt {-c+d x} \sqrt {c+d x}}{c^2 x}+\frac {(2 b) \operatorname {Subst}\left (\int \frac {1}{\sqrt {2 c+x^2}} \, dx,x,\sqrt {-c+d x}\right )}{d}\\ &=\frac {a \sqrt {-c+d x} \sqrt {c+d x}}{c^2 x}+\frac {(2 b) \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{d}\\ &=\frac {a \sqrt {-c+d x} \sqrt {c+d x}}{c^2 x}+\frac {2 b \tanh ^{-1}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 90, normalized size = 1.58 \[ \frac {\sqrt {d^2 x^2-c^2} \left (\frac {a \sqrt {d^2 x^2-c^2}}{c^2 x}+\frac {b \tanh ^{-1}\left (\frac {d x}{\sqrt {d^2 x^2-c^2}}\right )}{d}\right )}{\sqrt {d x-c} \sqrt {c+d x}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.29, size = 68, normalized size = 1.19 \[ -\frac {b c^{2} x \log \left (-d x + \sqrt {d x + c} \sqrt {d x - c}\right ) - a d^{2} x - \sqrt {d x + c} \sqrt {d x - c} a d}{c^{2} d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.22, size = 66, normalized size = 1.16 \[ \frac {\frac {16 \, a d^{2}}{{\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{4} + 4 \, c^{2}} - b \log \left ({\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{4}\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.07, size = 97, normalized size = 1.70 \[ \frac {\sqrt {d x -c}\, \sqrt {d x +c}\, \left (b \,c^{2} x \ln \left (\left (d x +\sqrt {d^{2} x^{2}-c^{2}}\, \mathrm {csgn}\relax (d )\right ) \mathrm {csgn}\relax (d )\right )+\sqrt {d^{2} x^{2}-c^{2}}\, a d \,\mathrm {csgn}\relax (d )\right ) \mathrm {csgn}\relax (d )}{\sqrt {d^{2} x^{2}-c^{2}}\, c^{2} d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.26, size = 55, normalized size = 0.96 \[ \frac {b \log \left (2 \, d^{2} x + 2 \, \sqrt {d^{2} x^{2} - c^{2}} d\right )}{d} + \frac {\sqrt {d^{2} x^{2} - c^{2}} a}{c^{2} x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.94, size = 77, normalized size = 1.35 \[ \frac {4\,b\,\mathrm {atan}\left (\frac {d\,\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}{\sqrt {-d^2}\,\left (\sqrt {c+d\,x}-\sqrt {c}\right )}\right )}{\sqrt {-d^2}}+\frac {a\,\sqrt {c+d\,x}\,\sqrt {d\,x-c}}{c^2\,x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [C] time = 36.82, size = 165, normalized size = 2.89 \[ - \frac {a d {G_{6, 6}^{5, 3}\left (\begin {matrix} \frac {5}{4}, \frac {7}{4}, 1 & \frac {3}{2}, \frac {3}{2}, 2 \\1, \frac {5}{4}, \frac {3}{2}, \frac {7}{4}, 2 & 0 \end {matrix} \middle | {\frac {c^{2}}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} c^{2}} - \frac {i a d {G_{6, 6}^{2, 6}\left (\begin {matrix} \frac {1}{2}, \frac {3}{4}, 1, \frac {5}{4}, \frac {3}{2}, 1 & \\\frac {3}{4}, \frac {5}{4} & \frac {1}{2}, 1, 1, 0 \end {matrix} \middle | {\frac {c^{2} e^{2 i \pi }}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} c^{2}} + \frac {b {G_{6, 6}^{6, 2}\left (\begin {matrix} \frac {1}{4}, \frac {3}{4} & \frac {1}{2}, \frac {1}{2}, 1, 1 \\0, \frac {1}{4}, \frac {1}{2}, \frac {3}{4}, 1, 0 & \end {matrix} \middle | {\frac {c^{2}}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} d} - \frac {i b {G_{6, 6}^{2, 6}\left (\begin {matrix} - \frac {1}{2}, - \frac {1}{4}, 0, \frac {1}{4}, \frac {1}{2}, 1 & \\- \frac {1}{4}, \frac {1}{4} & - \frac {1}{2}, 0, 0, 0 \end {matrix} \middle | {\frac {c^{2} e^{2 i \pi }}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________